package com.spring.cloud.provider.project.controller;

import com.spring.cloud.entity.Result;
import com.spring.cloud.entity.ResultUtil;
import com.spring.cloud.provider.project.po.UserPO;
import com.spring.cloud.provider.project.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping(value = "getUser")
    public Result getUser(){
        List<UserPO> list = userService.list();
        return ResultUtil.success(list);
    }

}
